Skip to content

feat(firestore): Support for Firestore Pipeline APIs#18013

Draft
SelaseKay wants to merge 75 commits intofeat/firestore-pipelinesfrom
feat-firestore-pipelines
Draft

feat(firestore): Support for Firestore Pipeline APIs#18013
SelaseKay wants to merge 75 commits intofeat/firestore-pipelinesfrom
feat-firestore-pipelines

Conversation

@SelaseKay
Copy link
Contributor

Description

Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.

Related Issues

Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

@SelaseKay SelaseKay changed the title Feat firestore pipelines feat(firestore): firestore pipelines support Feb 11, 2026
@SelaseKay SelaseKay force-pushed the feat-firestore-pipelines branch from f4d9cca to 9374586 Compare February 18, 2026 15:21
@SelaseKay SelaseKay force-pushed the feat-firestore-pipelines branch from 9374586 to b4089d8 Compare February 18, 2026 15:26
@SelaseKay SelaseKay changed the title feat(firestore): firestore pipelines support feat(firestore): Support for Firestore Pipeline APIs Feb 23, 2026
SelaseKay and others added 17 commits February 24, 2026 15:16
* use builtin GITHUB_TOKEN instead of explicit secret

* add explicit permission
…7988)

Support for reading entity ids from paths in response extension
Hardening SQLite to use transactions for edits
Setup schema versioning to handle future schema updates.
Handle edge cases - multi-dimensional arrays, mixed type arrays, scalar arrays
* feat: bump Firebase JS SDK to 12.9.0

* chore: fix formatting

* chore: revert JS SDK bump
* test: fix flaky CI

* fixing

* clean macos

* clean

* format

* fixing CI

* flaky fdc

* fix fdc

* update

* fix

* improve

* up to date

* fix

* clean

* cleaning
* chore: Migrate gsutil usage to gcloud storage

* Update start.md
…ing conversion (#17807)

* fix(analytics, iOS): Update hashedPhoneNumber handling to use hex string conversion and add Data extension for hex string initialization

* refactor: Replace Data extension with a dedicated hex string conversion function for hashedPhoneNumber handling
Lyokone and others added 4 commits March 3, 2026 16:04
* feat(messaging, web): add support for debug tokens on Web

* format

* fix analyze
… informations (#18065)

* fix(auth,ios): fix crash that could happen when reloading currentUser informations

* format
@cynthiajoan
Copy link
Collaborator

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Firestore Pipeline APIs across Android, iOS, and Web platforms. The changes include new Dart classes for building and executing pipelines, platform-specific implementations to parse and run these pipelines, and updates to the pigeon files for communication. The implementation looks solid, with new classes for expressions, stages, and results. I've left a few comments on the Android native implementation regarding null handling and code consistency. Additionally, there are significant refactoring changes in the firebase_data_connect package related to its caching mechanism, which seem to be out of scope for this PR but have been reviewed and appear correct.

Note: Security Review did not run due to the size of the PR.

Comment on lines +1020 to +1030
if (pipelineResult.getCreateTime() != null) {
resultBuilder.setCreateTime(pipelineResult.getCreateTime().toDate().getTime());
} else {
resultBuilder.setCreateTime(0L);
}

if (pipelineResult.getUpdateTime() != null) {
resultBuilder.setUpdateTime(pipelineResult.getUpdateTime().toDate().getTime());
} else {
resultBuilder.setUpdateTime(0L);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PigeonPipelineResult class defines createTime and updateTime as nullable Longs. Instead of setting them to 0L when the source timestamp is null, it would be more consistent to set them to null. This avoids forcing the Dart side to treat 0 as a special case for a missing timestamp.

Suggested change
if (pipelineResult.getCreateTime() != null) {
resultBuilder.setCreateTime(pipelineResult.getCreateTime().toDate().getTime());
} else {
resultBuilder.setCreateTime(0L);
}
if (pipelineResult.getUpdateTime() != null) {
resultBuilder.setUpdateTime(pipelineResult.getUpdateTime().toDate().getTime());
} else {
resultBuilder.setUpdateTime(0L);
}
if (pipelineResult.getCreateTime() != null) {
resultBuilder.setCreateTime(pipelineResult.getCreateTime().toDate().getTime());
} else {
resultBuilder.setCreateTime(null);
}
if (pipelineResult.getUpdateTime() != null) {
resultBuilder.setUpdateTime(pipelineResult.getUpdateTime().toDate().getTime());
} else {
resultBuilder.setUpdateTime(null);
}

Comment on lines +182 to +198
case "or":
{
List<Map<String, Object>> exprMaps = (List<Map<String, Object>>) args.get("expressions");
if (exprMaps == null || exprMaps.isEmpty()) {
throw new IllegalArgumentException("'or' requires at least one expression");
}
if (exprMaps.size() == 1) {
return parseBooleanExpression(exprMaps.get(0));
}
// BooleanExpression.or() takes exactly 2 parameters, so we chain them
BooleanExpression result = parseBooleanExpression(exprMaps.get(0));
for (int i = 1; i < exprMaps.size(); i++) {
BooleanExpression next = parseBooleanExpression(exprMaps.get(i));
result = BooleanExpression.or(result, next);
}
return result;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The implementation for the "or" expression is inconsistent with the "and" expression. The "and" case correctly delegates to ExpressionHelpers.parseAndExpression, but the "or" case re-implements the logic by chaining BooleanExpression.or() in a loop. To improve consistency and reduce code duplication, this should also use the helper method ExpressionHelpers.parseOrExpression.

      case "or":
        {
          List<Map<String, Object>> exprMaps = (List<Map<String, Object>>) args.get("expressions");
          return ExpressionHelpers.parseOrExpression(exprMaps, this);
        }

Comment on lines +302 to +316
} else if ("or".equals(operator)) {
if (exprMaps == null || exprMaps.isEmpty()) {
throw new IllegalArgumentException("'or' requires at least one expression");
}
if (exprMaps.size() == 1) {
return parseBooleanExpression(exprMaps.get(0));
}
// BooleanExpression.or() takes exactly 2 parameters, so we chain them
BooleanExpression result = parseBooleanExpression(exprMaps.get(0));
for (int i = 1; i < exprMaps.size(); i++) {
BooleanExpression next = parseBooleanExpression(exprMaps.get(i));
result = BooleanExpression.or(result, next);
}
return result;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This block duplicates the logic for parsing an "or" expression. To improve maintainability and align with the parsing of "and" expressions, please delegate this to the ExpressionHelpers.parseOrExpression helper method.

      } else if ("or".equals(operator)) {
        return ExpressionHelpers.parseOrExpression(exprMaps, this);
      }

Comment on lines +30 to +73
@SuppressWarnings("unchecked")
static BooleanExpression parseAndExpression(
@NonNull List<Map<String, Object>> exprMaps, @NonNull ExpressionParsers parser) {
if (exprMaps == null || exprMaps.isEmpty()) {
throw new IllegalArgumentException("'and' requires at least one expression");
}

BooleanExpression first = parser.parseBooleanExpression(exprMaps.get(0));
if (exprMaps.size() == 1) {
return first;
}

BooleanExpression[] rest = new BooleanExpression[exprMaps.size() - 1];
for (int i = 1; i < exprMaps.size(); i++) {
rest[i - 1] = parser.parseBooleanExpression(exprMaps.get(i));
}
return Expression.and(first, rest);
}

/**
* Parses an "or" expression from a list of expression maps. Uses Expression.or() with varargs
* signature.
*
* @param exprMaps List of expression maps to combine with OR
* @param parser Reference to ExpressionParsers for recursive parsing
*/
@SuppressWarnings("unchecked")
static BooleanExpression parseOrExpression(
@NonNull List<Map<String, Object>> exprMaps, @NonNull ExpressionParsers parser) {
if (exprMaps == null || exprMaps.isEmpty()) {
throw new IllegalArgumentException("'or' requires at least one expression");
}

BooleanExpression first = parser.parseBooleanExpression(exprMaps.get(0));
if (exprMaps.size() == 1) {
return first;
}

BooleanExpression[] rest = new BooleanExpression[exprMaps.size() - 1];
for (int i = 1; i < exprMaps.size(); i++) {
rest[i - 1] = parser.parseBooleanExpression(exprMaps.get(i));
}
return Expression.or(first, rest);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

The logic in parseAndExpression and parseOrExpression is very similar. To improve maintainability and reduce code duplication, consider extracting the common logic into a private helper method. This helper could accept the list of expression maps, the parser, and a functional interface representing the specific logical operation (Expression.and or Expression.or).

dbebawy and others added 24 commits March 4, 2026 10:57
…18071)

* fix(core): bump Firebase C++ SDK to 13.5.0 to resolve CMake deprecation warning

Resolves #12849. The bundled Firebase C++ SDK 13.4.0 sets
cmake_minimum_required(VERSION 3.1), which triggers a deprecation
warning on CMake 3.25+ and a hard error on CMake 4.x.

Firebase C++ SDK 13.5.0 bumps this to VERSION 3.22, fixing the
warning and restoring compatibility with modern CMake.

* chore: add David Bebawy to AUTHORS

* Revert "chore: add David Bebawy to AUTHORS"

This reverts commit 8f93138.
…8067)

* feat(firestore,web): add webPersistentTabManager settings support

* fix
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.3.6 to 5.4.2.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](NaturalIntelligence/fast-xml-parser@v5.3.6...v5.4.2)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(fdc,web): add WASM support and improve CI

* permissions clean

* clean
* fix(storage,web): contentType inference for web

* format
…restore instance (#18069)

* fix(firestore,windows): fix a crash happening when terminating the firestore instance

* fix test

* fix cached instance in Dart

* fix
* feat(analytics, iOS): add support for `logTransaction`

* chore: add test for `logTransaction` method

* chore: update logTransaction to require iOS 15+ or macOS 12+

* chore: update logTransaction to require iOS 15+ or macOS 12+

* chore: fix formatting

* chore: add availability check for fetchTransaction method on iOS 15+ and macOS 12+

* chore: enhance logTransaction method with platform-specific availability checks and improved transaction retrieval

* chore: update test skip condition to include macOS platform

* chore: update logTransaction method to support macOS in addition to iOS

* chore: enhance logTransaction tests with error handling for invalid transactionId and missing transactions

* chore: update analytics example app to include manual test for `logTransaction`

* chore: implement logTransaction method with unimplemented error for Android

* chore: update skip conditions for Firebase Analytics E2E tests to include web platform
…18079)

* feat(database,windows): add support for Realtime Database to windows

* format

* fix

* clean

* additionnal librairies

* emulator support attempt

* format

* fix tests

* clean

* details for CI

* clean

* clean

* fix

* clear

* fix

* removing dumb emulator support

* fixing event channels

* skip test for database, only work in manual testing

* format

* skip test

* clean

* clean
…SDK (#18086)

* fix(auth, ios): fix inconsistence in casing in the native iOS SDK with a workaround

* format

* fix for web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants